#

| Chapter 25 Showing What's in a File |

## 25.17 An Alias in Case You Don't Have tail

Some System V UNIX versions don't support the tail command (25.14). Here are a shell function and alias named ptail that give you an equivalent:

>     ptail() { sed -e :a -e '$q;N;11,$D;ba' $1; }

>     alias ptail sed -e :a -e \''$q;N;11,$D;ba'\'

This prints the last ten lines of a file. (Greg Ubben wrote ptail.)

- JP

25.16 How to Look at a File as It Grows |  | 25.18 Watching Several Files Grow